capture log close
log using NPN_test.log, replace
*************************************************************************
* Created by: 	Nicolas Petrosky-Nadeau						
* Created on: 	04/01/2024
* Description: 	Moments of earnings distribution, including by occ and ind
* Modified on:	04/01/2024 (NPN)
*************************************************************************

clear *
set more off
capture program drop _all
set linesize 240

** Pull in analysis extract 
use CPS-2020_ASEC-monthly_for_Sec_3.dta, clear


gen ln_weekly_earnings = ln(weekly_earnings)

* Overall
su weekly_earnings, d
su ln_weekly_earnings, d

* 25 to 54
su weekly_earnings if (age > 24 & age<55), d
su ln_weekly_earnings if (age > 24 & age<55), d


* Less than HS
su weekly_earnings if educ == 1, d
su ln_weekly_earnings if educ == 1, d


* HS
su weekly_earnings if educ == 2, d
su ln_weekly_earnings if educ == 2, d

* College and above
su weekly_earnings if educ >= 4, d
su ln_weekly_earnings if educ >= 4, d


* Management
su weekly_earnings if majocc == 1, d
su ln_weekly_earnings if majocc == 1, d

* Prof_tech
su weekly_earnings if majocc == 2, d
su ln_weekly_earnings if majocc == 2, d

* Services
su weekly_earnings if majocc == 3, d
su ln_weekly_earnings if majocc == 3, d

* Sales
su weekly_earnings if majocc == 4, d
su ln_weekly_earnings if majocc == 4, d

* Admin
su weekly_earnings if majocc == 5, d
su ln_weekly_earnings if majocc == 5, d

* Farm and Fish
su weekly_earnings if majocc == 6, d
su ln_weekly_earnings if majocc == 6, d

* Construction Extraction
su weekly_earnings if majocc == 7, d
su ln_weekly_earnings if majocc == 7, d

* Inst Maint Rep
su weekly_earnings if majocc == 8, d
su ln_weekly_earnings if majocc == 8, d

* Prod
su weekly_earnings if majocc == 9, d
su ln_weekly_earnings if majocc == 9, d

* Transp Materials
su weekly_earnings if majocc == 10, d
su ln_weekly_earnings if majocc == 10, d













